package com.donleo.word.service.impl;

import com.donleo.common.api.CommonResult;
import com.donleo.word.service.UserService;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * @author liangd
 * @since 2021-01-16 11:24
 */
@Component
public class UserServiceFallbackFactory implements FallbackFactory<UserService> {
    @Override
    public UserService create(Throwable throwable) {
        return (code) -> CommonResult.failed("连接异常");
    }
}
